// For authoring Nightwatch tests, see
// http://nightwatchjs.org/guide#usage

// testcase name：用户编号查询用户
// author：feizhao
// date：2017-11-08
// discription：用于测试登陆后，进行通过用户编号或超收费用等方式查询用户操作
// step：1.登录主页面  2.输入用户编号，用户类型查询用户

const accountConfig = {
  username: '1',
  password: '1'
}
module.exports = {
  ' tests': function (browser) {
    browser
    .url('http://127.0.0.1:8080').maximizeWindow()
     .pause(1000)
     .waitForElementVisible('body', 100)
    browser.setValue('input[type=text]', accountConfig.username)
     .pause(100)
     .setValue('input[type=password]', accountConfig.password)
     .pause(100)
     .click('button[id=login-button]')
     .pause(1000)
     .click('#vc-tree-name-档案管理')
     .pause(1000)
     .click('#vc-tree-name-用户档案')
// 通过用户名查询用户
     .pause(3000)
     .setValue('.flex-row.select-overspread :nth-child(1) input', '4004000321')
     .pause(1000)
     .click('#base-rightVie-cardLis-查询')
     .pause(1000)
     .clearValue('.flex-row.select-overspread :nth-child(1) input')
     .pause(1000)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#停用')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#超用收费')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#银行支付')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#卡表收费')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#补卡')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#档案变更')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#银行代扣')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#抄表员变更')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#气价变更')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#机表收费')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#启用')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#微信支付')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#其他收费')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#自动下账')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#换表')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#过户')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#档案变更')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(500)
     .click('.flex-row.select-overspread :nth-child(2) div :nth-child(1) ')
     .pause(500)
     .click('#补气')
     .pause(50)
     .click('#base-rightVie-cardLis-查询')
     .pause(10000)
     .end()
  }
}
